package com.woniu.model.mallSystem.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Lzj
 * @since 2023-10-19
 */
@Getter
@Setter
@TableName("t_order")
@ApiModel(value = "Order对象", description = "")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单表id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ExcelProperty(value = "订单号", index = 1)
    @ApiModelProperty("订单号")
    private String orderNumber;

    @ExcelProperty(value = "商品名")
    @ApiModelProperty("商品名")
    private String commodityName;

    @ExcelProperty(value = "商品ID")
    @ApiModelProperty("商品ID")
    private String commodityId;

    @ExcelProperty(value = "订单总金额")
    @ApiModelProperty("订单总金额")
    private BigDecimal totalPrice;

    @ExcelProperty(value = "下单时间")
    @ApiModelProperty("下单时间")
    private Date createTime;

    @ExcelProperty(value = "更新时间")
    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("订单来源（1app，2pc，3小程序）")
    @ExcelProperty(value = "订单来源（1app，2pc，3小程序）")
    private String orderOrigin;

    @ExcelProperty(value = "支付方式")
    @ApiModelProperty("支付方式（0，未支付，1微信，2支付宝）")
    private String payMethod;

    @ExcelProperty(value = "订单状态")
    @ApiModelProperty("订单状态（待支付、已支付、待发货、已发货、已完成、已关闭）")
    private Integer orderStatus;

    @ExcelProperty(value = "地址id")
    @ApiModelProperty("地址id")
    private Long addressId;

    @ExcelProperty(value = "用户id")
    @ApiModelProperty("用户id")
    private Long userId;

    @ExcelProperty(value = "物流单号")
    @ApiModelProperty("物流单号")
    private String logisticsNumber;

    @ApiModelProperty("删除标志")
    @TableLogic
    private Integer deleteFlag;

    //导出忽略字段
    @ExcelIgnore
    @ApiModelProperty("费用信息")
    private Long amountInfoId;


}
